<!-- Content  -->
<?php
	//统计精彩活动数量
	$len = count($activicy, true);
?>
	<div class="banner-bg">
		<div class="container page-content">
			<div class="col-sm-9 padding-none col-xs-12">
				<div id="slider" class="carousel slide" data-ride="carousel">
					<!-- Indicators -->
					<ol class="carousel-indicators">
						{volist name="slider" id="vo"}
							<li data-target="#slider" data-slide-to="{$i-1}"></li>
						{/volist}
					</ol>
					<!-- Wrapper for slides -->
					<div class="carousel-inner" role="listbox">
						{volist name="slider" id="vo"}
							<div class="item item-pc">
								<a href="{$vo.path_url|default='javascript:;'}" {if condition="$vo.open_mode eq 1"}target="_blank" {/if}>
									<img class="img-responsive img-silde" src="{$vo.thumb}" />
								</a>
								<div class="carousel-caption">
									<h3>{$vo.name}</h3>
								</div>
							</div>
						{/volist}
					</div>
					<!-- Controls -->
					<a class="left carousel-control" href="#slider" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">Previous</span>
					</a>
					<a class="right carousel-control" href="#slider" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
			<div class="col-md-3 no-padding">
				<!-- UserInfo Start -->
				<div class="score-sign hidden-sm hidden-xs">
					<div class="user-info">
						<div class="col-md-8 col-md-offset-2 no-padding">
							{if $user}
								<a href="{:url('index/user/index')}">
									<img src="{$user.avatar}" class="img-circle img-responsive score-user-avast center-block" alt="user avatar" />
								</a>
							{else /}
								<a href="{:url('index/user/login')}">
									<img src="/assets/img/avatar.png" class="img-circle img-responsive score-user-avast center-block" alt="user avatar" />
								</a>
							{/if}
						</div>
						<div class="clearfix"></div>
						<br>
						<div class="col-md-12 text-center">
						{if !$user}
							{:__('hello')} <a class="text-danger" href="{:url('index/user/login')}">{:__('login')}</a>
							<br>
							<br>
						{else /}
							<a class="" href="{:url('index/user/index')}">{:__('welcome')}, {$user.nickname}(56 Points)</a>
							<br />
							<a class="" href="{:addon_url('leescore/order/index')}">{:__('my orders')}</a>&nbsp;&nbsp;&nbsp;
							<a class="" href="{:url('index/user/logout')}">{:__('logout')}</a>
						{/if}
						</div>
						<div class="clearfix"></div>
						<div class="row margin-top">
							<div class="col-md-10 col-md-offset-1">
								{if($user)}
									<a target="_blank" href="{:addon_url('leesign/index/index')}" class="btn btn-block btn-danger border-none border-radius-big">{:__('sign btn')}</a>
								{else /}
									<a href="{:url('index/user/login')}" class="btn btn-block btn-danger border-none border-radius-big">{:__('login')}</a>
								{/if}
							</div>
							<br />
							<br />
						</div>
						<div class="hidden-md">
							<br>
						</div>
						<div class="row">
							<div class="col-md-12 padding-none" style="height: 102px;">
								<ul class="padding-none sign-panl">
									<li class="col-sm-6 col-xs-3 text-center padding-small">
										<a class="lezuan" href="javascript:;">
											<i class="glyphicon glyphicon-xbt center-block padding-small" style="font-size: 30px;"></i>
											<span>{:__('le zhuan ji fen')}</span>
										</a>
									</li>
									<li class="col-sm-6 col-xs-3 text-center padding-small">
										<a href="{:addon_url('leescore/goods/index')}">
											<i class="center-block glyphicon glyphicon-gift padding-small" style="font-size: 30px;"></i>
											<span>{:__('score buy')}</span>
										</a>
									</li>
								</ul>
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
				<!-- UserInfo End -->
			</div>
			<div class="clearfix"></div>
			<br>	
			{notempty name="hotList"}
			<!-- 热门商品 -->
			<div class="row">
				<div class="col-md-12 col-xs-12">
					<h3> <span class="glyphicon glyphicon-fire text-red"></span> {:__('hot goods')} </h3>
					<div class="hotlist-box bg-white">
						<ul class="goods-table clearfix">
							{volist name="hotList" id="vo"}
							<li class="col-md-4 col-xs-12 padding-none">
								<div class="padding">
									<div class="row hidden-xs">
										<div class="col-xs-6"><a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}"><img src="{$vo.thumb}" style="max-height: 120px;" class="img-responsive" /></a></div>
										<div class="col-xs-6" style="padding-left: 0px;">
											<h4 class="more"><a class="hotgoods-title" href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}">{$vo.name}</a></h4>
											{if($vo.scoreprice > 0)}
											<span class="text-red"><i class="text-yellow glyphicon glyphicon-piggy-bank"></i> <strong>{$vo.scoreprice}</strong>{:__('score')}</span> 
											{/if}
											{if($vo.scoreprice > 0 && $vo.money > 0)} + {/if}
											{if($vo.money > 0)}
												 <span class="text-red"><i class="text-yellow glyphicon glyphicon-yen"></i> <strong> {$vo.money}</strong> {:__('money')}</span>
											{/if}
											{if($vo.scoreprice <= 0 && $vo.money <= 0 )} 
												<label for="" class="label label-danger">{:__('no score and money')}</label>
											{/if}							
											<h5 class="text-muted">{:__('use num')}：{$vo.usenum} </h5>
											<h5>{:__('stock')}：{$vo.stock}</h5>
											<div class="btn-group hidden-xs">
												<a href="javascript:;" data-paramid="{$vo.id}" data-url="{:addon_url('leescore/cart/add')}" class="btn btn-warning border-radius-big add-cart btn-xs border-none {if($vo['stock'] < 1)}disabled{/if}"><i class="fa fa-cart-plus"></i> {:__('add cart')}</a>
												<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}" class="btn btn-danger btn-xs border-radius-big border-none {if($vo['stock'] < 1)}disabled{/if}">{:__('buy')}</a>
											</div>
										</div>
										<div class="clearfix"></div>
									</div>
									<div class="row visible-xs">
										<div class="col-xs-6"><a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}"><img src="{$vo.thumb}" style="max-height: 120px;" class="img-responsive" /></a></div>
										<div class="col-xs-6" style="padding-left: 0px;">
											<h4 class="more"><a class="hotgoods-title" href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}">{$vo.name}</a></h4>
											{if($vo.scoreprice > 0)}
											<span class="text-red"><i class="text-yellow glyphicon glyphicon-piggy-bank"></i> {$vo.scoreprice} {:__('score')}</span> 
											{/if}
											{if($vo.scoreprice > 0 && $vo.money > 0)} + {/if}
											{if($vo.money > 0)}
												 <span class="text-red">{$vo.money} {:__('money')}</span>
											{/if}
											{if($vo.scoreprice <= 0 && $vo.money <= 0 )} 
												<label for="" class="label label-danger">{:__('no score and money')}</label>
											{/if}							
											<h5 class="text-muted">{:__('use num')}: {$vo.usenum} </h5>
											<h5 class="text-muted">{:__('stock')}：{$vo.stock}</h5>
											<div class="btn-group hidden-xs">
												<a href="javascript:;" style="border-radius: 2px" data-paramid="{$vo.id}" data-url="{:addon_url('leescore/cart/add')}" class="btn btn-warning border-radius-big add-cart btn-xs border-none {if($vo['stock'] < 1)}disabled{/if}"><i class="fa fa-cart-plus"></i> {:__('加入购物车')}</a>
												<a style="border-radius: 2px" href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}" class="btn btn-danger btn-xs border-radius-big border-none {if($vo['stock'] < 1)}disabled{/if}">{:__('立即购买')}</a>
											</div>
										</div>
										<div class="clearfix"></div>
									</div>
								</div>
								<div class="padding text-center visible-xs">
									<a href="javascript:;" style="border-radius: 3px;" data-paramid="{$vo.id}" data-url="{:addon_url('leescore/cart/add')}" class="btn btn-warning border-radius-big add-cart border-none btn-flat {if($vo['stock'] < 1)}disabled{/if}"><i class="fa fa-cart-plus"></i> {:__('加入购物车')}</a>
									<a style="border-radius: 2px;" href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}" class="btn btn-flat btn-danger border-radius-big border-none {if($vo['stock'] < 1)}disabled{/if}">{:__('立即购买')}</a>
								</div>
							</li>
							{/volist}
						</ul>
					</div>
				</div>
			</div>
			<!-- ./ 热门商品 -->
			{/notempty}
			<div class="clearfix"></div>
			<br>

			<div class="hidden-xs">
			<!-- XF 产品列表 -->
			{if($cate)}
				{volist name='cate' id="nl" key="n"}
				<div class="f-list f-list-{$n}">
					<div class="f-list-title"><span style="font-size: 30px;">{$n}F</span><span class="text-big">{$nl['name']}</span> <span class="pull-right"><a class="text-muted h5" href="{:addon_url('leescore/goods/index',array('cateType' => $nl['id']))}">{:__('more')}<i class="fa fa-angle-double-right"></i></a></span></div>
					<div class="col-sm-3 f-list-nav-l padding-none hidden-xs">
						<div class="f-l-ad">
							<ul>
								{if($nl['navs'])}
									{volist name="nl['navs']" id="v"}
										<li class="f-l-item pull-left col-sm-5 padding-none"><a href="{:addon_url('leescore/goods/index',array('cateType' => $v['id']))}" class="btn btn-sm btn-default btn-flat btn-block">{$v['name']}</a></li>
									{/volist}
								{/if}
							</ul>
						</div>
					</div>
					<div class="col-sm-9 padding-none">
						<div class="f-list-body" {if($n % 8 !=0 )}style="border-bottom:1px solid #eee;" {/if}>
							<ul>
								{if(!$nl['goods'])}
									<li class="alert alert-default padding">{:__("no this type goods")}。</li>
								{/if}
								{volist name="$nl['goods']" id="vo" key="key"}
									<li class="f-list-body-item col-sm-3" {if($key % 4 ==0 )}style="border-right:0px solid #eee;" {/if}>
										<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}"><img class="pro-thumb center-block" src="{$vo['thumb']}" alt=""></a>
										<div class="pro-title h4 text-center text-muted more">
											<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}">{$vo['name']}</a>
										</div>
										<div class="col-sm-12 padding-none line-height-25">
											{if($vo.scoreprice > 0)}
											<span class="text-red"><i class="text-yellow glyphicon glyphicon-piggy-bank"></i> <strong>{$vo.scoreprice}</strong>{:__('score')}</span> 
											{/if}
											{if($vo.scoreprice > 0 && $vo.money > 0)} + {/if}
											{if($vo.money > 0)}
												 <span class="text-red"><i class="text-yellow glyphicon glyphicon-yen"></i> <strong> {$vo.money}</strong> {:__('money')}</span>
											{/if}
										</div>
										<div class="col-sm-12 padding-none text-muted">
											<span>{:__('stock')}：{$vo.stock}</span> {if((int) $vo['stock'] < 1)}<span class="pull-right label label-warning">备货中...</span>{/if}
										</div>
										<div class="col-sm-12 margin-top text-center padding-none">
											<a href="javascript:;" data-url="{:addon_url('leescore/cart/add')}" data-paramid="{$vo.id}" class="btn btn-warning btn-xs {if($vo['stock'] < 1)}disabled{/if} add-cart"><i class="fa fa-cart-plus"></i> {:__('add cart')}</a> &nbsp;&nbsp;&nbsp;
											<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}" class="btn btn-danger btn-xs {if($vo['stock'] < 1)}disabled{/if}">{:__('buy')}</a>
										</div>
									</li>
								{/volist}
							</ul>
						</div>
					</div>
					<div class="clearfix"></div>
				</div>
				{/volist}
			</div>
			<!-- ./ XF 产品列表 -->

			<!-- 移动端商品拉列表 -->
			<div class="visible-xs">
			<!-- XF 产品列表 -->
			{if($cate)}
				{volist name='cate' id="nl" key="n"}
				<div class="f-list f-list-{$n}">
					<div class="f-list-title"><span style="font-size: 30px;">{$n}F</span><span class="text-big">{$nl['name']}</span> <span class="pull-right"><a class="text-muted h5" href="{:addon_url('leescore/goods/index',array('cateType' => $nl['id']))}">{:__('more')}<i class="fa fa-angle-double-right"></i></a></span></div>
					<div class="col-sm-3 f-list-nav-l padding-none hidden-xs">
						<div class="f-l-ad">
							<ul>
								{if($nl['navs'])}
									{volist name="nl['navs']" id="v"}
										<li class="f-l-item pull-left col-sm-5 padding-none"><a href="{:addon_url('leescore/goods/index',array('cateType' => $v['id']))}" class="btn btn-sm btn-default btn-flat btn-block">{$v['name']}</a></li>
									{/volist}
								{/if}
							</ul>
						</div>
					</div>
					<div class="col-sm-9 padding-none">
						<div class="f-list-body" {if($n % 8 !=0 )}style="border-bottom:1px solid #eee;" {/if}>
							<ul>
								{if(!$nl['goods'])}
									<li class="alert alert-default padding">{:__("no this type goods")}。</li>
								{/if}
								{volist name="$nl['goods']" id="vo" key="key"}
									<li class="f-list-body-item col-sm-3" {if($key % 4 ==0 )}style="border-right:0px solid #eee;" {/if}>
										<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}"><img class="pro-thumb center-block" src="{$vo['thumb']}" alt=""></a>
										<div class="pro-title h4 text-center text-muted more hidden-xs">
											<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}">{$vo['name']}</a>
										</div>
										<div class="pro-title h2 text-center text-muted visible-xs">
											<a href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}">{$vo['name']}</a>
										</div>
										<div class="col-sm-12 col-xs-6 padding-none line-height-25  text-center">
											{if($vo.scoreprice > 0)}
											<span class="text-red">{$vo.scoreprice}{:__('score')}</span> 
											{/if}
											{if($vo.scoreprice > 0 && $vo.money > 0)} + {/if}
											{if($vo.money > 0)}
												 <span class="text-red">{$vo.money} {:__('money')}</span>
											{/if}
										</div>
										<div class="col-sm-12  padding-none text-muted">
											<span>{:__('stock')}: {$vo.stock}</span> {if((int) $vo['stock'] < 1)}<span class="pull-right label label-warning">备货中...</span>{/if}
										</div>
										<div class="col-sm-12 margin-top text-center padding-none">
											<a href="javascript:;" style="border-radius: 3px;" data-url="{:addon_url('leescore/cart/add')}" data-paramid="{$vo.id}" class="btn btn-warning  {if($vo['stock'] < 1)}disabled{/if} add-cart"><i class="fa fa-cart-plus"></i> {:__('add cart')}</a> &nbsp;&nbsp;&nbsp;
											<a style="border-radius: 3px;" href="{:addon_url('leescore/goods/details',array('gid' => $vo['id']))}" class="btn btn-danger {if($vo['stock'] < 1)}disabled{/if}">{:__('buy')}</a>
										</div>
										<div class="clearfix"></div>
									</li>
								{/volist}
							</ul>
							<div class="clearfix"></div>
						</div>
					</div>
					<div class="clearfix"></div>
				</div>
				{/volist}
			<!-- ./ XF 产品列表 -->
			</div>
			{/if}
			<div class="clearfix"></div>
			<br>
			<br>
		</div>
	</div>
<!-- Content  -->
	</div>
<!-- Layer -->

<script>
	$(document).ready(function() {
		$(".item-pc").eq(0).addClass('active');
		$(".item-mobile").eq(0).addClass('active');
		$("ol.carousel-indicators li").eq(0).addClass('active');
		$(".score-activicy").eq(0).addClass('active');
		$(".recommend-li").last().removeClass('recommend-li');
		$(".item-mobile").eq(0).addClass('active');
		$(".score-activicy-mobile").eq(0).addClass('active');
		$('.divider').last().remove();
	});

	$(".lezuan").on('click', function() {
		layer.msg("暂未开放积分收益渠道，仅能通过安装签到插件获取积分。");
	});

	function opening()
	{
		layer.msg("{:__('opening tips')}");
	}
	/* 幻灯滑块鼠标左右拖动触发滚动 */
	$("#slider").swipe({
		swipeLeft:function(){
			$(this).carousel('next');
		},
		swipeRight:function(){
			$(this).carousel('prev');
		}
	});
	/* 幻灯滑块鼠标左右拖动触发滚动 Mobile*/
	$("#slider-mobile").swipe({
		swipeLeft:function(){
			$(this).carousel('next');
		},
		swipeRight:function(){
			$(this).carousel('prev');
		}
	});
	/* 竞猜活动鼠标左右拖动触发滚动 Mobile*/
	$("#activicy-mobile").swipe({
		swipeLeft:function(){
			$(this).carousel('next');
		},
		swipeRight:function(){
			$(this).carousel('prev');
		}
	});
</script>
